package com.originalpoint.origin_server.pojo;

import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 *用户实体类
 */
@TableName("user")
@NoArgsConstructor
@AllArgsConstructor
@Data
@Schema(name = "User" ,description = "客户信息表")
public class User {
    @Schema(name = "userId" ,description = "客户ID")
    private Integer userId;

    @Schema(name = "userName" ,description = "客户名字")
    private String userName;

    @Schema(name = "userPassword" ,description = "客户密码")
    private String userPassword;

    @Schema(name = "userImg" ,description = "客户图片")
    private String userImg;

    @Schema(name = "u_addressId" ,description = "地址ID")
    private Integer u_addressId;

    @Schema(name = "userAuthority" ,description = "客户权限")
    private Integer userAuthority;
//    关联对象
    @Schema(name = "address" ,description = "地址信息")
    private Address address;


    public User(String userName, String userPassword, String userImg, Integer u_addressId) {
        this.userName = userName;
        this.userPassword = userPassword;
        this.userImg = userImg;
        this.u_addressId = u_addressId;
    }

    public User(Integer userId, String userName, String userPassword, String userImg, Integer u_addressId) {
        this.userId = userId;
        this.userName = userName;
        this.userPassword = userPassword;
        this.userImg = userImg;
        this.u_addressId = u_addressId;
    }

    public User(Integer userId, String userName, Integer u_addressId) {
        this.userId = userId;
        this.userName = userName;
        this.u_addressId = u_addressId;
    }
}
